package com.jtlrm.ckd.mvp.view.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.jtlrm.ckd.R;
import com.jtlrm.ckd.base.acitvity.WebBaseActivity;

public class LiangBiaoDetailActivity extends WebBaseActivity {

    String url;
    String title;

    public static void goDetail(Context context, String url, String title) {
        Intent intent = new Intent(context, LiangBiaoDetailActivity.class);
        intent.putExtra("url", url);
        intent.putExtra("title", title);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        url = getIntent().getStringExtra("url");
        title = getIntent().getStringExtra("title");
        super.onCreate(savedInstanceState);
        titleBar.layout.setBackgroundResource(R.color.green4);
        titleBar.tvMiddle.setTextColor(getResourceColor(R.color.white));
        titleBar.btLeft.setImageResource(R.drawable.white_back);
    }

    @Override
    protected String getTitleText() {
        if (notEmpty(title)) {
            return title;
        }
        return "添加";
    }

    @Override
    protected String getUrl() {
        return url;
    }
}
